import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { BusinessCommentComponent } from './comment/comment.component';
import { BusinessInboundPlanComponent } from './inbound-plan/inbound-plan.component';
import { BusinessItemsIndicateComponent } from './items-indicate/items-indicate.component';
import { BusinessNetflowComponent } from './netflow/netflow.component';
import { BusinessOrderComponent } from './order/order.component';
import { BusinessRefundConfirmedComponent } from './refund-confirmed/refund-confirmed.component';
import { BusinessRefundComponent } from './refund/refund.component';
import { BusinessSaleStatisticsComponent } from './sale-statistics/sale-statistics.component';
import { BusinessShipmentInboundComponent } from './shipment-inbound/shipment-inbound.component';
import { BusinessShipmentComponent } from './shipment/shipment.component';
import { BusinessShopComponent } from './shop/shop.component';
import { BusinessStatisticsComponent } from './statistics/statistics.component';
import { BusinessWareAnalysisComponent } from './ware-analysis/ware-analysis.component';

const routes: Routes = [
  { path: 'order', component: BusinessOrderComponent },
  { path: 'refund', component: BusinessRefundComponent },
  { path: 'shop', component: BusinessShopComponent },
  { path: 'netflow', component: BusinessNetflowComponent },
  { path: 'items-indicate', component: BusinessItemsIndicateComponent },
  {
    path: 'shipment-inbound',
    component: BusinessShipmentInboundComponent,
    children: [
      { path: '', redirectTo: 'shipment', pathMatch: 'full' },
      {
        path: 'shipment',
        component: BusinessShipmentComponent
      },
      {
        path: 'inbound-plan',
        component: BusinessInboundPlanComponent
      }
    ]
  },
  { path: 'ware-analysis', component: BusinessWareAnalysisComponent },
  { path: 'comment', component: BusinessCommentComponent },
  { path: 'refund-confirmed', component: BusinessRefundConfirmedComponent },
  { path: 'statistics', component: BusinessStatisticsComponent },
  { path: 'sale-statistics', component: BusinessSaleStatisticsComponent }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class BusinessRoutingModule {}
